package designpattern.singleton;
//2、懒汉式，线程安全
public class Singleton2 {
	private Singleton2(){
	}
	private static Singleton2 SINGLE_OBJECT;
	
	public static synchronized Singleton2 getInstance() {
		if(SINGLE_OBJECT==null){
			SINGLE_OBJECT=new Singleton2();
		}
		return SINGLE_OBJECT;
	}
}
